import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import VideoManage from '../views/course/VideoManage.vue'

let originPush = VueRouter.prototype.push;
VueRouter.prototype.push = function (path) {
  return originPush.call(this, path).catch(err => err);
};

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/VideoManage',
    component: VideoManage
  }
]

const router = new VueRouter({
  routes
})

export default router
